﻿using System;
using System.Collections.Generic;
using Cool.Core.Entities.System;
using Furion.DatabaseAccessor;
using Microsoft.EntityFrameworkCore;

namespace Cool.Core.SeedData
{
    /// <summary>
    /// 用户表种子数据 <see cref="SysRole"/>
    /// </summary>
    public class SysRoleSeedData : IEntitySeedData<SysRole>
    {
        /// <summary>
        /// 种子数据
        /// </summary>
        /// <param name="dbContext"></param>
        /// <param name="dbContextLocator"></param>
        /// <returns></returns>
        public IEnumerable<SysRole> HasData(DbContext dbContext, Type dbContextLocator)
        {
            return new[]
            {
                new SysRole
                {
                    Id=1,RoleName="超级管理员",CreatedTime=DateTime.Now,IsDeleted=false,Status='0'
                },
                new SysRole
                {
                    Id=2,RoleName="测试用户",CreatedTime=DateTime.Now,IsDeleted=false,Status='0'
                }
            };
        }
    }
}
